
const double COMMON_MARGIN_LENGTH = 20;

//一阶段-服务UUID
const String APP_OTA_SERVICE_UID = "5265616C-6D70-6761-2D49-6E73696465AA";
//一阶段-写命令特征UUID
const String APP_OTA_WRITE_UID = "5265616C-6D71-6761-2D49-6E73696465AA";
//一阶段-版本信息特征UUID
const String APP_OTA_VERSION_UID = "5265616C-6D72-6761-2D49-6E73696465AA";
//一阶段-通知特征UUID
const String APP_OTA_NOTIFY = "5265616C-6D73-6761-2D49-6E73696465AA";

//二阶段-服务UUID
const String BOOT_OTA_SERVICE_UID = "5265616C-6D65-6761-2D49-6E73696465AA";
//二阶段-命令UUID
const String BOOT_OTA_CMD_UID = "5265616C-6D66-6761-2D49-6E73696465AA";
//二阶段-回应UUID
const String BOOT_OTA_ASK_UID = "5265616C-6D67-6761-2D49-6E73696465AA";

//一阶段相关通知码
const String ASK_STATE_SUCC = "0";//表示启动升级成功
const String ASK_STATE_FAIL_MAC = "1";//表示写入随机地址不合法
const String ASK_STATE_FAIL_CODE = "2";//表示mac code认证失败，目标设备中mac code与APP中用户设置的mac code 不一致

//二阶段相关通知码
const String ASK_STATE_UNKNOW = "1";//表示升级过程中收到未知命令
const String ASK_STATE_NOT_EXPECT = "2";//表示收到不是预期的包类型
const String ASK_STATE_FCS_ERROR = "3";//表示收到一个Block之后，计算出的FCS 和 收到的包信息中的FCS不匹配
const String ASK_STATE_ADDR_INVALID = "4";//表示包信息中收到的Target Adress为非法地址
const String ASK_STATE_CREDIT_ERROR = "5";//表示升级时，写入的Credit Code不合法


//新版本ServiceUID
//一阶段-服务UUID
const String APP_OTA_SERVICE_UID_V2 = "5265616C-6D80-6761-2D49-6E73696465AA";
//一阶段-写命令特征UUID
const String APP_OTA_WRITE_UID_V2 = "5265616C-6D81-6761-2D49-6E73696465AA";
//一阶段-版本信息特征UUID
const String APP_OTA_VERSION_UID_V2 = "5265616C-6D82-6761-2D49-6E73696465AA";
//一阶段-通知特征UUID
const String APP_OTA_NOTIFY_V2 = "5265616C-6D83-6761-2D49-6E73696465AA";